package com.mediator;

import com.mediator.concrete.People;
import com.mediator.concrete.extend.Buyer;
import com.mediator.concrete.extend.Seller;
import com.mediator.dispatcher.Mediator;
import com.mediator.dispatcher.extend.ConcreteMediator;

public class Test {
    public static void main( String[] args ) {
        Mediator mediator = new ConcreteMediator();
        People buyer = new Buyer();
        People seller = new Seller();
        mediator.register(buyer);
        mediator.register(seller);

        buyer.send("我想买一套100平的房，靠近地铁，有地下车库");
        System.out.println("-------------");
        seller.send("您好，有的，请问您那边什么时候有时间过来看");
    }
}
